﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Shake.Framework.View;
using Shake.Framework.Attributes;
using Shake.Framework.Repository;
using Flight.Models;

namespace Flight.Controllers
{
    [Theme("LayUiAdmin")]
    public class FlightController : Controller
    {
        public IRepository Repository { get; set; }

        //
        // GET: /Flight/

        public ActionResult Index()
        {
            FlightTx flight = new FlightTx
            {
                Id = Guid.NewGuid().ToString("N"),
                Number = "12304",
                IsValid = false,
                Type = Emuns.FlightTxType.J,
                FlightTime = DateTime.Now.AddHours(48),
                DepartureTime = DateTime.Now.AddHours(24)
            };

            Repository.Insert(flight);
            return this.Shake();
        }

    }
}
